#include <stdio.h>

typedef int Length;

typedef struct { Length x, y, z; } vec3D;

vec3D addVectors(vec3D v1, vec3D v2)
{
	vec3D sum = {v1.x + v2.x, v1.y + v2.y, v1.z + v2.z};
	return sum;
}

int main( int argc, const char* argv[] )
{
	vec3D v1 = {12, 5, -3}, v2 = {-22, -1, 13};
	vec3D sum = addVectors(v1, v2);
	printf( "vector 1: (%d, %d, %d)\n", v1.x, v1.y, v1.z);	
	printf( "vector 2: (%d, %d, %d)\n", v2.x, v2.y, v2.z);
	printf( "sum:      (%d, %d, %d)\n", sum.x, sum.y, sum.z);
}
